import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import '@/assets/scss/index.scss'
// Toast
import 'vant/es/toast/style'
import Scroll from '@/components/scroll/index.vue'
// 导入走马灯组件和样式
import Vue3Marquee from 'vue3-marquee'

import lazyPlugin from 'vue3-lazy'
// 导入loading自定义指令
import LoadingDirective from '@/directive/loading'
import loadingImg from '@/assets/images/default.png'
const app = createApp(App)
app.use(Vue3Marquee)
app.component('Scroll', Scroll)
app.use(createPinia())
app.use(router)
app.use(lazyPlugin, {
  loading: loadingImg
})
app.directive('loading', LoadingDirective)
app.mount('#app')
